Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JSON formatted Config files #14

Merged
merged 4 commits into from
Oct 3, 2022

Conversation

alexsam29
Copy link
Contributor

@alexsam29 alexsam29 commented Oct 3, 2022

Overview

This pull request is intended to resolve #13.

Users will be able to pass in a JSON formatted configuration file as an option. This config file can contain any number of the options that this tool supports. Therefore, the user would not need to specify all options individually as command line arguments

Features

  • Added ability to read from a config JSON file containing all required options.

Code Changes

  • Added additional option in main.js line: 10 to accept -c/--config arguments.
  • Created a new function (readConfigFile) in main.js line: 45 to read and parse JSON files.
  • Added a conditional statement that will call readConfigFile if a config file is specified in the command line. Each option in the file will be passed into generateHTML

@alexsam29 alexsam29 marked this pull request as ready for review October 3, 2022 07:16
@NeilAn99 NeilAn99 merged commit 29cdeba into NeilAn99:main Oct 3, 2022
@NeilAn99
Copy link
Owner

NeilAn99 commented Oct 3, 2022

Looks good!

@alexsam29 alexsam29 deleted the issue-13 branch October 3, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for --config with a JSON formatted Config file
2 participants